/*
 * Copyright (C) 2017 Pingan, Inc. All Rights Reserved.
 */

package com.pingan.haofang.searchcloud.web.project.form;

import com.pingan.haofang.searchcloud.common.constants.Constants;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import org.hibernate.validator.constraints.Length;
import org.hibernate.validator.constraints.NotBlank;

import javax.validation.constraints.Pattern;

/**
 * 项目数据表单
 *
 * @author zhangbi617
 * @date 08/05/2017
 */
@ApiModel(description = "项目信息")
public class ProjectForm {

    /**
     * 项目编号ID
     */
    @ApiModelProperty(value = "项目ID，创建时不需要")
    private Long id;

    /**
     * 项目名称，最大长度64
     */
    @ApiModelProperty(value = "项目名称，最大长度64", required = true)
    @NotBlank
    @Length(max = 64)
    private String projectName;

    /**
     * 项目编码，最大长度64
     */
    @ApiModelProperty(value = "项目编码，最大长度64", required = true)
    @NotBlank
    @Length(max = 64)
    @Pattern(regexp = Constants.NAME_PATTERN, message = "common.name.pattern.error")
    private String projectCode;

    /**
     * 项目简介
     */
    @ApiModelProperty(value = "项目简介", required = true)
    @NotBlank
    @Length(max = 512)
    private String introduction;

    /**
     * 项目负责人
     */
    @ApiModelProperty(value = "项目负责人", required = true)
    private Long masterId;

    /**
     * 项目负责人
     */
    @ApiModelProperty(value = "警报邮件收件人user_name,多个以','分开")
    private String mailTo;

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public String getProjectName() {
        return projectName;
    }

    public void setProjectName(String projectName) {
        this.projectName = projectName;
    }

    public String getProjectCode() {
        return projectCode;
    }

    public void setProjectCode(String projectCode) {
        this.projectCode = projectCode;
    }

    public String getIntroduction() {
        return introduction;
    }

    public void setIntroduction(String introduction) {
        this.introduction = introduction;
    }

    public Long getMasterId() {
        return masterId;
    }

    public void setMasterId(Long masterId) {
        this.masterId = masterId;
    }

    public String getMailTo() {
        return mailTo;
    }

    public void setMailTo(String mailTo) {
        this.mailTo = mailTo;
    }

    @Override
    public String toString() {
        return "ProjectForm{" +
                "id=" + id +
                ", projectName='" + projectName + '\'' +
                ", projectCode='" + projectCode + '\'' +
                ", introduction='" + introduction + '\'' +
                ", masterId=" + masterId +
                '}';
    }
}
